// Start is called before the first frame update
        public void Start()
        {
            float angle = 0;

            float offset = _characters.Length == 1 ? 0 : _multipleOffsetSize;

            foreach (Objects.Characters.Character character in _characters)
            {
                Vector2 positionXY = new Vector2(
                    Mathf.Sin(angle * Mathf.Deg2Rad),
                    Mathf.Cos(angle * Mathf.Deg2Rad));

                Vector3 positionxyz = new Vector3(
                    transform.position.x + positionXY.x * offset,
                    transform.position.y,
                    transform.position.z + positionXY.y * offset);

                Objects.Characters.Character instance = Instantiate(
                    character.gameObject,
                    transform.position,
                    Quaternion.identity,
                    _room.transform).GetComponent <Objects.Characters.Character>();

                Room.OnCharacterStartStaticHandler?.Invoke(instance);

                angle += _multipleAngleBetween;
            }

            Destroy(gameObject);
        }
Exemple #2
0
 public virtual bool TryApply(Characters.Character source, ActionProduct action, IEffect effect)
 {
     return(effect.TryApply(source, action, this));
 }
Exemple #3
0
 public virtual bool Verify(Characters.Character source, ICondition condition)
 {
     return(condition.Verify(source, this));
 }