Exemple #1
0
 void Start()
 {
     camera = GameObject.FindGameObjectWithTag("camera").GetComponent <CameraFollowScript>();
     OSES   = camera.GetComponent <onScreenElementsScript>();
     //player = GameObject.FindGameObjectWithTag ("player");
     currentXP = 0; baseXPMax = 100;
     // SETTING TANKS DAMAGE ABILITIES
     setAbilityOneDamage();
     setabilityTwoDamage();
     setabilityThreeDamage();
 }
    void Start()
    {
        camera = GameObject.FindGameObjectWithTag("camera").GetComponent <CameraFollowScript>();
        OSES   = camera.GetComponent <onScreenElementsScript>();

        // SETTING DAMAGE OF ARCHERS ABILITIES
        // METHODS TAKEN FROM ARCHER-CHARACTER-SCRIPT
        setFireShotDamage();
        setPiercingDamage();
        setHOADamage();
        //player = GameObject.Find("player");
        currentXP = 0; baseXPMax = 100;
    }
    // Use this for initialization
    void Start()
    {
        ICameraData camData = userCamera.GetComponent <ICameraData>();

        spCamera = camData.SpCamera;

        invertoryLogic = GetComponent <IInvertoryData>().InvertoryLogic;

        Transform           follow = transform;
        CharacterController characterController = GetComponent <CharacterController>();

        characterControl = new SpacemarineMove(ref characterController, ref follow, collideWith);

        movementInput = new SpMovementAndMeleeCombat(ref rayCastFrom, collideWith, ref characterController);
        movementLogic = new SpMovementAndMeleeLogic(movementInput);

        rangedInput = new RangedCombatInput();
        rangedLogic = new RangedCombatLogic(ref rangedInput, spCamera.CameraTransform);

        spaceMove = new ControlSpMovement(ref movementLogic, ref characterControl,
                                          ref characterAnimator, ref rangedLogic,
                                          ref invertoryLogic, ref spCamera);
    }