Beispiel #1
0
        public void Cast(SkillDefinition _definition, int _playerId, Vector3 _position, Quaternion _rotation, out string uniqueKey, Transform _parent = null)
        {
            var    newSkill       = Instantiate(_definition.Prefab, _position, _rotation, _parent);
            string uniqueSkillKey = String.Format("{0}-{1}-{2}", _playerId.ToString(), _definition.Name, Guid.NewGuid());

            uniqueKey = uniqueSkillKey;
            newSkill.GetComponent <SkillBehavior>().CasterId = uniqueSkillKey;
        }
Beispiel #2
0
 public GameObject Cast(SkillDefinition _definition, Vector3 _position, Quaternion _rotation, Transform _parent = null)
 {
     return(Instantiate(_definition.Prefab, _position, _rotation, _parent));
 }