コード例 #1
0
	// Use this for initialization
	void Awake () {
		Debug.Log ("battle sights start ");

		this._npc = new NpcAttributes();
		this._npc._name = this._name;
		this._npc._hp = this._hp;
		this._npc._attack_power = this._attack_power;
		this._npc._defense_power = this._defense_power;
		this._npc.init();

		StartCoroutine("sp_BattleSight");
		this._playerInfo = new PlayerInfo();

		this._hudActionsMapper = new List<Animator>();
		this._hudActionsMapper.Add (GameObject.Find ("Attack_ScaryFace").GetComponent<Animator>());
		this._hudActionsMapper.Add (GameObject.Find ("Attack_Food").GetComponent<Animator>());
		this._hudActionsMapper.Add (GameObject.Find ("Attack_Pose").GetComponent<Animator>());
		this._hudActionsMapper.Add (GameObject.Find ("Attack_Fart").GetComponent<Animator>());

		this._leroyAnimationMapper = new List<string>();
		this._leroyAnimationMapper.Add ("attack_scaryface");
		this._leroyAnimationMapper.Add ("attack_food");
		this._leroyAnimationMapper.Add ("attack_pose");
		this._leroyAnimationMapper.Add ("attack_fart");

		BattleActionsController battleActionController = Pick.Instance.getBattleActionsController();
		this._hudActionSoundMapper = new List<AudioSource>();
		this._hudActionSoundMapper.Add (battleActionController._AttackScaryFace);
		this._hudActionSoundMapper.Add (battleActionController._AttackFood);
		this._hudActionSoundMapper.Add (battleActionController._AttackPose);
		this._hudActionSoundMapper.Add (battleActionController._AttackFart);
	}
コード例 #2
0
    void Start()
    {
        // Recuperamos al jugador gracias al Tag
        player = GameObject.FindGameObjectWithTag("Player");

        // Guardamos nuestra posición inicial
        initialPosition = transform.position;

        anim       = GetComponent <Animator>();
        rb2d       = GetComponent <Rigidbody2D>();
        attributes = GetComponent <NpcAttributes>();
    }
コード例 #3
0
	// Use this for initialization
	void Start () {
		this._animator = GetComponent<Animator>();

		this._npc = new NpcAttributes();
		this._npc._name = this._name;
		this._npc._hp = this._hp;
		this._npc._attack_power = this._attack_power;
		this._npc._defense_power = this._defense_power;

		this._weight = 200;
		this.updateWeightLabel();

		this.getNpc().init();
	}
コード例 #4
0
    void Start()
    {
        anim       = GetComponent <Animator>();
        rb2d       = GetComponent <Rigidbody2D>();
        attributes = GetComponent <NpcAttributes>();

        //* Recuperamos el collider de ataque y lo desactivamos
        attackCollider         = transform.GetChild(0).GetComponent <CircleCollider2D>();
        attackCollider.enabled = false;

        Camera.main.GetComponent <MainCamera>().SetBound(initialMap);

        aura = transform.GetChild(1).GetComponent <Aura>();
    }
コード例 #5
0
 void Start()
 {
     attributes = GetComponent <NpcAttributes>();
 }