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; }
public SpeedChange(CharacterParameterBasis.SpeedType speed) : base(AbilityLevel.ONE) { Speed = speed; }
private int calcElementalDamage(int damage, CharacterParameterBasis.Elemental elemental) { return (int)(damage * ParameterOffset.getElementalRegist(elemental)); }
public float getElementalRegist(CharacterParameterBasis.Elemental elemental) { float ret = 1.0f; if (elemental < CharacterParameterBasis.Elemental.NONE) { ret = ElementalRegist[(int)elemental]; } return ret; }
public void setElementalRegist(float value, CharacterParameterBasis.Elemental elemental) { if (elemental < CharacterParameterBasis.Elemental.NONE) { ElementalRegist[(int)elemental] = value; } }
public virtual void init(CharacterParameterBasis param) { Parameter = param; }
public ElementalSlayer(CharacterParameterBasis.Elemental elemental, AbilityLevel level) : base(level) { TargetElemental = elemental; }
public ElementalDamage(MyCharacterController attacker, MyCharacterController target, int damage, CharacterParameterBasis.Elemental elemental) : base(attacker, target) { Damage = damage; Elemental = elemental; }
public void setElementalPoewr(CharacterParameterBasis.Elemental elemental,float power) { ElementalPowers[(int)elemental] = power; }
public float getElementalPower(CharacterParameterBasis.Elemental elemental) { return ElementalPowers[(int)elemental]; }
CharacterParameterBasis.SpeedType getNextLevel(CharacterParameterBasis.SpeedType current) { int next = (int)current + 1; next = Mathf.Min(next, (int)CharacterParameterBasis.SpeedType.VERYFAST); return (CharacterParameterBasis.SpeedType)next; }
bool canLevelUp(CharacterParameterBasis.SpeedType current) { return current < CharacterParameterBasis.SpeedType.VERYFAST; }