示例#1
0
        private void OnDestroy()
        {
            if (current == this)
            {
                current = null;
            }

            level_builder.game_over(game_over_reason);
        }
示例#2
0
        void Start()
        {
            movable       = GetComponentInParent <Movable>();
            level_builder = GameObject.Find("GameSystem").GetComponent <ProceduralLevelBuilder>();

            guns    = GetComponentsInChildren <Gun>(true);
            shields = GetComponentsInChildren <Shield>(true);

            trails = GetComponent <TrailRenderer>();

            if (level_builder == null)
            {
                Debug.LogError("No level builder found");
            }

            current = this;
        }