Пример #1
0
 private void Start()
 {
     HP          = MaxHP;
     gameManager = transform.root.GetComponent <GameManager>();
     delayTimer  = GetComponent <DelayTimer>();
     delayTimer.SetTimerCapacity(2);
     DisableTarget();
 }
Пример #2
0
    private void Start()
    {
        thisTimer    = GetComponent <DelayTimer>();
        thisCollider = GetComponent <Collider>();
        thisTimer.SetTimerCapacity(1); // delayTimerを予約

        thisMeshRenderer.material = normalMaterial;
    }
Пример #3
0
    private void Start()
    {
        delayTimer = GetComponent <DelayTimer>();
        delayTimer.SetTimerCapacity(1);

        nameData = new NameData[transform.childCount];
        Debug.Log(nameData);
        for (int i = 0; i < transform.childCount; i++)
        {
            nameData[i] = transform.GetChild(i).GetComponent <NameData>();
        }

        ResetName();
    }
Пример #4
0
        void Start()
        {
            // UI Cam Initialize
            Timer.SetTimerCapacity(1);
            MinimapObject.gameObject.SetActive(false);
            AutoButton.gameObject.SetActive(false);
            ManualButton.gameObject.SetActive(false);
            PlayerTrackerRoot.gameObject.SetActive(false);
            LandmarkTrackerRoot.gameObject.SetActive(false);
            TeleportDialog.SetActive(false);
            OnClickChangeAutoMode();

            // MapView Initalize
            if (!useUserMapImage)
            {
                SnapshotCamera.gameObject.SetActive(false);
                MapView.Setup(SnapshotCamera.orthographicSize, zoomMaxRange);
                MapOffset = new Vector2(SnapshotCamera.transform.position.x, SnapshotCamera.transform.position.z);
            }
            else
            {
                MapView.Setup(userMapSize, zoomMaxRange);
                MapOffset = userMapOffset;
            }

            scrollMaxPosition = MapView.scrollMaxPosition;
            scrollMinPosition = MapView.scrollMinPosition;
            MapSizeFactor     = MapView.mapsizeFactor;
            CamFactor         = MapView.camFactor;

            if (!useUserMapImage)
            {
                MapWidth  = SnapshotCamera.orthographicSize * 2 * MapSizeFactor;
                MapHeight = SnapshotCamera.orthographicSize * 2 * MapSizeFactor;
            }
            else
            {
                MapWidth  = userMapSize * 2 * MapSizeFactor;
                MapHeight = userMapSize * 2 * MapSizeFactor;
            }

            // Tracker cache GetComponent
            playerTracker    = new RectTransform[PlayerTrackerRoot.childCount];
            playerIconButton = new Button[PlayerTrackerRoot.childCount];
            playerName       = new Text[PlayerTrackerRoot.childCount];
            for (int i = 0; i < playerTracker.Length; i++)
            {
                playerTracker[i]    = PlayerTrackerRoot.GetChild(i).GetComponent <RectTransform>();
                playerIconButton[i] = PlayerTrackerRoot.GetChild(i).GetComponent <Button>();
                playerName[i]       = playerTracker[i].GetComponentInChildren <Text>();
                playerName[i].text  = "";
                playerTracker[i].gameObject.SetActive(false);
            }

            LandmarkTracker    = new RectTransform[LandmarkTrackerRoot.childCount];
            landmarkIconButton = new Button[LandmarkTrackerRoot.childCount];
            LandmarkName       = new Text[LandmarkTrackerRoot.childCount];
            for (int i = 0; i < LandmarkTracker.Length; i++)
            {
                LandmarkTracker[i]    = LandmarkTrackerRoot.GetChild(i).GetComponent <RectTransform>();
                landmarkIconButton[i] = LandmarkTrackerRoot.GetChild(i).GetComponent <Button>();
                LandmarkName[i]       = LandmarkTracker[i].GetComponentInChildren <Text>();
                if (i < LandmarkPoint.Length)
                {
                    if (LandmarkPoint[i] != null)
                    {
                        LandmarkName[i].text = LandmarkPoint[i].name;
                    }
                }
            }
        }
Пример #5
0
 private void Start()
 {
     timer.SetTimerCapacity(1);
     teleportDialog.gameObject.SetActive(false);
     selectPlayerText.text = "";
 }
 void Start()
 {
     resetPosition = GetComponent <ResetTransform>();
     delayTimer    = GetComponent <DelayTimer>();
     delayTimer.SetTimerCapacity(2);
 }