Beispiel #1
0
	// ================================================================ //

	public override void		create(chrBehaviorEnemy behavior, ActionBase.DescBase desc_base = null)
	{
		base.create(behavior, desc_base);

		this.melee_attack = new MeleeAttackAction();
		this.melee_attack.create(this.behavior);

		this.spring = new ipModule.Spring();
		this.spring.k      = 300.0f;
		this.spring.reduce = 0.90f;

		// 스폰 → 착지 시에 바운드하지 않게 합니다.
		this.behavior.basic_action.jump.bounciness.y = 0.0f;
	}
Beispiel #2
0
    // AI의 종류(행동 패턴)을 설정한다.
    public void             setBehaveKind(Enemy.BEHAVE_KIND behave_kind, Character.ActionBase.DescBase desc_base = null)
    {
        Character.ActionBase unique_action = null;

        switch (behave_kind)
        {
        default:
        case Enemy.BEHAVE_KIND.BOTTACHI:                unique_action = new Character.BottachiAction();                 break;

        case Enemy.BEHAVE_KIND.OUFUKU:                  unique_action = new Character.OufukuAction();                   break;

        case Enemy.BEHAVE_KIND.UROURO:                  unique_action = new Character.UroUroAction();                   break;

        case Enemy.BEHAVE_KIND.TOTUGEKI:                unique_action = new Character.TotugekiAction();                 break;

        case Enemy.BEHAVE_KIND.SONOBA_DE_FIRE:  unique_action = new Character.SonobaDeFireAction();             break;

        case Enemy.BEHAVE_KIND.WARP_DE_FIRE:    unique_action = new Character.WarpDeFireAction();               break;

        case Enemy.BEHAVE_KIND.JUMBO:                   unique_action = new Character.JumboAction();                    break;

        case Enemy.BEHAVE_KIND.GOROGORO:                unique_action = new Character.GoroGoroAction();                 break;
        }

        if (unique_action != null)
        {
            if (desc_base == null)
            {
                desc_base = new Character.ActionBase.DescBase();
            }

            this.behave_kind = behave_kind;

            this.unique_action = unique_action;
            this.unique_action.create(this, desc_base);

            this.basic_action.unique_action = this.unique_action;
        }
    }
Beispiel #3
0
	// 자식 계층 종료 체크.
	public bool		finish_child()
	{
		bool	ret = false;

		do {

			if(this.child == null) {

				break;
			}
			if(!this.child.is_finished) {

				break;
			}

			//

			this.child = null;
			ret = true;

		} while(false);

		return(ret);
	}
Beispiel #4
0
        }                                                               // 부모가 실행 중에도 실행.

        // 자식 계층을 시작합니다.
        public void             push(ActionBase child)
        {
            this.child = child;
            this.child.start();
        }
Beispiel #5
0
	// ================================================================ //

	public override void		create(chrBehaviorEnemy behavior, ActionBase.DescBase desc_base = null)
	{
		base.create(behavior, desc_base);

		this.melee_attack = new MeleeAttackAction();
		this.melee_attack.create(this.behavior);

		this.model = this.behavior.gameObject.findChildGameObject("model");
	}
Beispiel #6
0
	// ================================================================ //

	public override void		create(chrBehaviorEnemy behavior, ActionBase.DescBase desc_base = null)
	{
		base.create(behavior, desc_base);

		Desc	desc = desc_base as Desc;

		if(desc == null) {

			desc = new Desc(this.control.getPosition());
		}

		this.positions[0]  = desc.position0;
		this.positions[1]  = desc.position1;

		this.melee_attack = new MeleeAttackAction();
		this.melee_attack.create(this.behavior);
	}
Beispiel #7
0
	// ================================================================ //

	public override void		create(chrBehaviorEnemy behavior, ActionBase.DescBase desc_base = null)
	{
		base.create(behavior, desc_base);

		this.melee_attack = new MeleeAttackAction();
		this.melee_attack.create(this.behavior);
	}
Beispiel #8
0
	// AI의 종류(행동 패턴)을 설정한다.
	public void		setBehaveKind(Enemy.BEHAVE_KIND behave_kind, Character.ActionBase.DescBase desc_base = null)
	{
		Character.ActionBase	unique_action = null;

		switch(behave_kind) {

			default:
			case Enemy.BEHAVE_KIND.BOTTACHI:		unique_action = new Character.BottachiAction();			break;
			case Enemy.BEHAVE_KIND.OUFUKU:			unique_action = new Character.OufukuAction();			break;
			case Enemy.BEHAVE_KIND.UROURO:			unique_action = new Character.UroUroAction();			break;
			case Enemy.BEHAVE_KIND.TOTUGEKI:		unique_action = new Character.TotugekiAction();			break;
			case Enemy.BEHAVE_KIND.SONOBA_DE_FIRE:	unique_action = new Character.SonobaDeFireAction();		break;
			case Enemy.BEHAVE_KIND.WARP_DE_FIRE:	unique_action = new Character.WarpDeFireAction();		break;
			case Enemy.BEHAVE_KIND.JUMBO:			unique_action = new Character.JumboAction();			break;
			case Enemy.BEHAVE_KIND.GOROGORO:		unique_action = new Character.GoroGoroAction();			break;
		}

		if(unique_action != null) {

			if(desc_base == null) {

				desc_base = new Character.ActionBase.DescBase();
			}

			this.behave_kind = behave_kind;

			this.unique_action = unique_action;
			this.unique_action.create(this, desc_base);

			this.basic_action.unique_action = this.unique_action;
		}
	}
Beispiel #9
0
	public virtual void		stealth() {}			// 부모가 실행 중에도 실행.

	// 자식 계층을 시작합니다.
	public void		push(ActionBase child)
	{
		this.child = child;
		this.child.start();
	}
Beispiel #10
0
	// ================================================================ //

	// 생성합니다.
	public virtual void		create(chrBehaviorEnemy behavior, ActionBase.DescBase desc_base = null)
	{
		this.behavior = behavior;
		this.control  = behavior.control;
	}
Beispiel #11
0
	public Vector3		outlet_vector      = Vector3.forward;	// 제네레이터에서 튀어나올 때의 속도.


	// ================================================================ //

	// 생성합니다.
	public override void		create(chrBehaviorEnemy behavior, ActionBase.DescBase desc_base = null)
	{
		base.create(behavior, desc_base);

		this.motion_speed.current = 0.0f;
		this.motion_speed.goal    = 0.0f;

		this.animator = this.behavior.gameObject.GetComponent<Animator>();

		this.jump = new ipModule.Jump();
		this.jump.gravity *= 3.0f;
		this.jump.bounciness = new Vector3(1.0f, -0.4f, 1.0f);
	}