Ejemplo n.º 1
0
    void Start()
    {
        cont = transform.GetComponent <SurvivorRecogRangeCollider>();

        controller     = GetComponent <CharacterController>();
        survivorStatus = GetComponent <SurvivorStatus>();
        playerAnimator = this.gameObject.GetComponent <Animator>();
        Inventory      = GetComponent <SurvivorInventory>();
        survivorAudio  = GetComponent <SurvivorAudio>();
        ragDoll        = GameObject.Find("/Survivor/Bip001/Bip001 Pelvis"); //레그돌
        ScreenMidPoint = new Vector3(Screen.width / 2, Screen.height / 2, 0f);

        BearCollider            = transform.Find("RecogRangeColliderGroup").Find("BearRecogRangeCollider").gameObject;
        BeeCollider             = transform.Find("RecogRangeColliderGroup").Find("BeeRecogRangeCollider").gameObject;
        BoarCollider            = transform.Find("RecogRangeColliderGroup").Find("BoarRecogRangeCollider").gameObject;
        SnakeCollider           = transform.Find("RecogRangeColliderGroup").Find("SnakeRecogRangeCollider").gameObject;
        recogRangeColliderGroup = transform.Find("RecogRangeColliderGroup").gameObject;

        Action = false;
        //Fire1 = false;
        Fire2 = false;
        Sneak = false;

        runSpeedBackUp = runSpeed;
    }
Ejemplo n.º 2
0
 public void SetUp()
 {
     navMeshAgent = GetComponent <NavMeshAgent>();
     navMeshAgent.updatePosition = true;
     inventory          = GetComponent <SurvivorInventory>();
     inventory.survivor = this;
     action             = GetComponent <SurvivorAction>();
     animator           = GetComponent <Animator>();
 }
Ejemplo n.º 3
0
    void Start()
    {
        SurvivorInventory survivorInventory = GetComponent <SurvivorInventory>();

        survivorInventory.enabled = true;

        SurvivorStatus survivorStatus = GetComponent <SurvivorStatus>();

        survivorStatus.enabled    = true;
        survivorStatus.PlayerID   = ID;
        survivorStatus.PlayerName = playerName;
        gameObject.name           = playerName;
        transform.Find("PlayerNameText").GetComponent <TextMesh>().text = playerName;

        if (GameController.GetInstance() != null)
        {
            GameController.GetInstance().GameControllerInit();
        }

        survivorStatus.uiSurvivor = GameObject.Find("UI/Canvas/SurvivorPanel").GetComponent <UISurvivor>();
        survivorStatus.uiSurvivor.SurvivorUIStart();

        SetClothColor(playerColor);
    }