Last active
September 16, 2019 18:07
-
-
Save walterpalladino/e6b4c744c821524867ce05a8ebf1b6c5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class MonoObject : MonoBehaviour | |
{ | |
private PureClass pc; | |
// Start is called before the first frame update | |
void Start() | |
{ | |
pc = new PureClass("String Prop", 1.75f); | |
} | |
// Update is called once per frame | |
void Update() | |
{ | |
Debug.Log("Check Pure Class data : " + pc.attrString + " / " + pc.attrFloat ); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System.Collections; | |
using System.Collections.Generic; | |
public class PureClass | |
{ | |
public string attrString; | |
public float attrFloat; | |
public PureClass(string paramString, float paramFloat) { | |
attrString = paramString; | |
attrFloat = paramFloat; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is just a test related to creating pure C# classes passing parameters on constructor.