public void playArrow() { EmitArrow = Emit3.GetSSAction(); Arrow = ArrowFactory.getArrow(sceneController.round); this.RunAction(Arrow, EmitArrow, this); Arrow.GetComponent <DiskData3>().action = EmitArrow; }
void OnTriggerEnter(Collider other) { Debug.Log(other.gameObject.tag); if (other.gameObject.tag == "Arrow") { if (!other.gameObject.GetComponent <DiskData3>().hit) { other.gameObject.GetComponent <DiskData3>().hit = true; Debug.Log(num); sceneController.score += num; } EmitDisk = (Emit3)other.gameObject.GetComponent <DiskData3>().action; //print(this.gameObject); other.gameObject.GetComponent <Rigidbody>().velocity = Vector3.zero; EmitDisk.Destory(); } }
public static Emit3 GetSSAction() { Emit3 action = ScriptableObject.CreateInstance <Emit3>(); return(action); }