// mother of all start functions, will handle the initialization of a lot of things void Start() { charStats = this.gameObject.GetComponent <CharacterStats>(); charStats.bds = this; movementScript = this.gameObject.GetComponent <NPCMovementScript>(); evalTree.bds = this; evalTree.SetupInitialSnippets(); }
public void checkTarget(GameObject go) { if (go == curTarget) { selectNewTarget(); mainCamera.GetComponent <OneHunnScript>().Play(); Score.getInstance().add(100); go.GetComponent <NPCMovementScript>().OnHit(); } else { if (go.tag == "NPC") { NPCMovementScript script = go.GetComponent <NPCMovementScript>(); if (!script.isRagdoll) { Score.getInstance().add(-100); go.GetComponent <NPCMovementScript>().OnHit(); } } } Debug.Log(Score.getInstance().getScore()); }