// Update is called once per frame void Update() { if (!Available) { return; } // Debug.Log("#" + gameObject.GetHashCode() + ": pos " + gameObject.transform.position); if (gameObject.transform.position.y <= -10.0f) { Available = false; // notify Subjects.NotifyUpdate(Subject.Ball); } }
void Destory() { // notify Subjects.NotifyUpdate(Subject.Stage); }
protected override void PostAwake() { Available = true; // notify Subjects.NotifyUpdate(Subject.Ball); }
// Start is called before the first frame update void Start() { // notify Subjects.NotifyUpdate(Subject.Stage); }