예제 #1
0
 void Start()
 {
     cam = (CameraSmooth)FindObjectOfType(typeof(CameraSmooth));
     yyy = this.transform.position.y;
     xxx = this.transform.position.x;
     DestroyObject(gameObject, 1.4f);
 }
예제 #2
0
 void Start()
 {
     cam = (CameraSmooth)FindObjectOfType (typeof(CameraSmooth));
     yyy = this.transform.position.y;
     xxx = this.transform.position.x;
     DestroyObject (gameObject,1.4f);
 }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     this.cameraObject = GameObject.Find("MainCamera");
     this.create = GameObject.Find("ShootPosition").GetComponent<Create>();
     this.cameraSmoothScipt = this.cameraObject.GetComponent<CameraSmooth>();
     this.addValue = 0;
 }
예제 #4
0
 private void Start()
 {
     mItemDatabase     = GameObject.FindGameObjectWithTag("Item Database").GetComponent <ItemDatabase>();
     mMouseLook        = Camera.main.GetComponent <CameraSmooth>();
     mVitalsController = GetComponent <VitalsController>();
     mInventory        = GetComponent <Inventory>();
     mInventory.SetPlayer(this);
     collider.material.dynamicFriction = 0f;
     collider.material.staticFriction  = 0f;
     WeaponInventory = new List <Item>();
 }
예제 #5
0
    /// <summary>
    /// Начальная инициализация
    /// </summary>
    private void Start()
    {
        allive            = true;
        Damage            = 10;
        hp                = Maxhp;
        money             = startmoney;
        Physics2D.gravity = new Vector2(0, -30f);
        anim              = GetComponent <Animator>();

        camScript = camera1.GetComponent <CameraSmooth>();
        camScript.SetKD(KDturn);

//		UIMoneyText = UIMoney.GetComponent<TextMesh> ();
    }
예제 #6
0
    // Use this for initialization
    void Start()
    {
        lootableArcher  = true;
        lootArcher      = Random.Range(10, 18);
        camScriptArcher = (CameraSmooth)FindObjectOfType(typeof(CameraSmooth));
        characterControllerScript player = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));

        //+ on directorAI
        director = (CreatureDirector)FindObjectOfType(typeof(CreatureDirector));
        director.countCreature++;
        //
        playerTransformArcher = player.transform;
        playerscrArcher       = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));
        animArcher            = GetComponent <Animator>();
        scaleDespawn          = despawnT;
        alliveArcher          = true;
    }
예제 #7
0
    /// <summary>
    /// Начальная инициализация
    /// </summary>
    private void Start()
    {
        smoothtext = 1.0f;
        lootable   = true;
        loot       = Random.Range(7, 14);
        camScript  = (CameraSmooth)FindObjectOfType(typeof(CameraSmooth));
        characterControllerScript player = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));

        //+ on directorAI
        director = (CreatureDirector)FindObjectOfType(typeof(CreatureDirector));
        director.countCreature++;
        //
        playerTransform = player.transform;
        playerscr       = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));
        anim            = GetComponent <Animator>();
        allive          = true;
        scaleDespawn    = despawnT;
    }
예제 #8
0
    // Use this for initialization
    private void Start()
    {
        mouseLook        = Camera.main.GetComponent <CameraSmooth>();
        vitalsController = GetComponent <VitalsController>();

        maxSlots = slotsX * slotsY; //finds the current maximum slots

        //Adds null items to both the slots and inventory list, until filled

        for (int i = 0; i < (slotsX * slotsY); i++)
        {
            slots.Add(new Item());
            inventory.Add(new Item());
        }

        //initialize database

        database = GameObject.FindGameObjectWithTag("Item Database").GetComponent <ItemDatabase>();
    }
예제 #9
0
 // Use this for initialization
 void Start()
 {
     cam = camObj.GetComponent <CameraSmooth> ();
 }
예제 #10
0
 /// <summary>
 /// Начальная инициализация
 /// </summary>
 private void Start()
 {
     smoothtext = 1.0f;
     lootable = true;
     loot = Random.Range (7, 14);
     camScript = (CameraSmooth)FindObjectOfType (typeof(CameraSmooth));
     characterControllerScript player = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));
     //+ on directorAI
     director = (CreatureDirector)FindObjectOfType (typeof(CreatureDirector));
     director.countCreature++;
     //
     playerTransform = player.transform;
     playerscr = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));
     anim = GetComponent<Animator>();
     allive = true;
     scaleDespawn = despawnT;
 }
예제 #11
0
 // Use this for initialization
 void Start()
 {
     player        = FindObjectOfType <CharacterControls>();
     healthManager = FindObjectOfType <HealthManager2> ();
     cam           = FindObjectOfType <CameraSmooth> ();
 }
예제 #12
0
 // Use this for initialization
 void Start()
 {
     lootableArcher = true;
     lootArcher = Random.Range (10, 18);
     camScriptArcher = (CameraSmooth)FindObjectOfType (typeof(CameraSmooth));
     characterControllerScript player = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));
     //+ on directorAI
     director = (CreatureDirector)FindObjectOfType (typeof(CreatureDirector));
     director.countCreature++;
     //
     playerTransformArcher = player.transform;
     playerscrArcher = (characterControllerScript)FindObjectOfType(typeof(characterControllerScript));
     animArcher = GetComponent<Animator>();
     scaleDespawn = despawnT;
     alliveArcher = true;
 }
    /// <summary>
    /// Начальная инициализация
    /// </summary>
    private void Start()
    {
        allive = true;
        Damage = 10;
        hp = Maxhp;
        money = startmoney;
        Physics2D.gravity = new Vector2 (0, -30f);
        anim = GetComponent<Animator>();

        camScript=camera1.GetComponent<CameraSmooth>();
        camScript.SetKD(KDturn);

        //		UIMoneyText = UIMoney.GetComponent<TextMesh> ();
    }