public static MyCharacterController enableCharacterEntityNotNotifySpawn(CharacterParameterBasis character, Vector2 pos, bool hasNPCsetter = false)
 {
     MyCharacterController entity = GameController.EnemyPool.GetChild(0).GetComponent<MyCharacterController>();
     entity.init(character);
     entity.CurrentPosition = pos;
     entity.updatePosition();
     entity.setActive(true);
     entity.gameObject.name += entitynum.ToString();
     entitynum++;
     entity.HasTileSetter = hasNPCsetter;
     return entity;
 }
 public void init(CharacterParameterBasis param)
 {
     this.Parameter = param;
     if (param != null)
     {
         CurrentHostile = param.DefaultHostle;
         resetActed();
         if (this is EnemyController) gameObject.name = param.Name;
         // スプライトとアニメーターの設定をする
         //Debug.Log(Parameter.Skin.Sprite);
         SpriteRenderer.sprite = Parameter.Skin.Sprite;
         Animator.runtimeAnimatorController = Parameter.Skin.AnimatorController as RuntimeAnimatorController;
         Parameter.Controller = this;
     }
     else
     {
         SpriteRenderer.sprite = GameSkins.DebugCharacter;
         Animator.runtimeAnimatorController = null;
     }
     CurrentMoveState = MoveState.STOP;
     CurrentDirection = Direction.F;
     CurrentPosition = transform.position;
     CurrentActionState = ActionState.IDLE;
     VisitedEntranceDoor = new List<Vector2>();
     RestActionCost = 0;
     MoveRate = DefaultSpeed;
     AttackerLog = new Deque<MyCharacterController>(damagedlogcapacity);
 }
 public static MyCharacterController enableCharacterEntity(CharacterParameterBasis character, Vector2 pos,bool hasNPCsetter = false)
 {
     MyCharacterController entity = enableCharacterEntityNotNotifySpawn(character, pos, hasNPCsetter);
     GameController.GameActionEvent.spawnCharacter(entity);
     return entity;
 }
Ejemplo n.º 4
0
 public SpeedChange(CharacterParameterBasis.SpeedType speed)
     : base(AbilityLevel.ONE)
 {
     Speed = speed;
 }
 private int calcElementalDamage(int damage, CharacterParameterBasis.Elemental elemental)
 {
     return (int)(damage * ParameterOffset.getElementalRegist(elemental));
 }
Ejemplo n.º 6
0
 public float getElementalRegist(CharacterParameterBasis.Elemental elemental)
 {
     float ret = 1.0f;
     if (elemental < CharacterParameterBasis.Elemental.NONE) {
         ret = ElementalRegist[(int)elemental];
     }
     return ret;
 }
Ejemplo n.º 7
0
 public void setElementalRegist(float value, CharacterParameterBasis.Elemental elemental)
 {
     if (elemental < CharacterParameterBasis.Elemental.NONE)
     {
         ElementalRegist[(int)elemental] = value;
     }
 }
Ejemplo n.º 8
0
 public virtual void init(CharacterParameterBasis param)
 {
     Parameter = param;
 }
Ejemplo n.º 9
0
 public ElementalSlayer(CharacterParameterBasis.Elemental elemental, AbilityLevel level)
     : base(level)
 {
     TargetElemental = elemental;
 }
Ejemplo n.º 10
0
 public ElementalDamage(MyCharacterController attacker, MyCharacterController target, int damage, CharacterParameterBasis.Elemental elemental)
     : base(attacker, target)
 {
     Damage = damage;
     Elemental = elemental;
 }
Ejemplo n.º 11
0
 public void setElementalPoewr(CharacterParameterBasis.Elemental elemental,float power)
 {
     ElementalPowers[(int)elemental] = power;
 }
Ejemplo n.º 12
0
 public float getElementalPower(CharacterParameterBasis.Elemental elemental)
 {
     return ElementalPowers[(int)elemental];
 }
Ejemplo n.º 13
0
 CharacterParameterBasis.SpeedType getNextLevel(CharacterParameterBasis.SpeedType current)
 {
     int next = (int)current + 1;
     next = Mathf.Min(next, (int)CharacterParameterBasis.SpeedType.VERYFAST);
     return (CharacterParameterBasis.SpeedType)next;
 }
Ejemplo n.º 14
0
 bool canLevelUp(CharacterParameterBasis.SpeedType current)
 {
     return current < CharacterParameterBasis.SpeedType.VERYFAST;
 }