コード例 #1
0
ファイル: DeliveryTarget.cs プロジェクト: Kundara/project1
 // Use this for initialization
 void Start()
 {
     missions = FindObjectOfType<Missions>();
     animator = GetComponent<Animator>();
 }
コード例 #2
0
ファイル: StatusIndicators.cs プロジェクト: Kundara/project1
        public void Init()
        {
            _combat = transform.root.GetComponent<Combat> ();
            _multiplayerPlayerController = GetComponentInParent<MultiplayerPlayerController> ();
            PlayerObjectReferences playerObjects = GetComponentInParent<PlayerObjectReferences>();
            character = playerObjects.character.gameObject;

            if (_combat.isLocalPlayer) {
                enemyContainer.SetActive (false);
                container.SetActive (true);

                // set to 0 to fill niceley when starting
                _healthBarNewFill = 0.0f;
            } else {
                enemyContainer.SetActive (true);
                container.SetActive (false);
            }

            animator = GetComponent<Animator>();
            missions = FindObjectOfType<Missions>();

            missions.OnMissionStart += SetMissionDirector;
            missions.OnMissionEnd += DestroyMissionDirector;

            isInitialized = true;
        }