protected virtual void Awake()
    {
        // Initialize stuff
        anim    = new SmartAnimator(GetComponent <Animator> ());
        effects = new Dictionary <string, Locks> ();

        // Initialize crystal
        mat            = GetComponentInChildren <Renderer> ().sharedMaterial;
        _EmissionColor = Shader.PropertyToID("_EmissionColor");
        SwitchCrystal(value: true);

        // Get some references
        me             = GetComponent <CharacterController> ();
        areaOfEffect   = GetComponentInChildren <Marker> ();
        areaCollider   = areaOfEffect.GetComponent <SphereCollider> ();
        targetRotation = transform.rotation;

        // Find other playera
        FindOther();

        // Spawn Audio prefab
        var prefab = Resources.Load <CharacterSFX> ("Prefabs/Audio/Character_SFX");

        sound = Instantiate(prefab, transform);
    }
Пример #2
0
 public static void SetCharFX(CharacterSFX charFx)
 {
     _charFx = charFx;
 }