示例#1
0
    public override void Initialize()
    {
        base.Initialize();
        playerAnim.SetSpell(this, SkillType.WindField);

        windField = GameObject.Find("WindField").GetComponent <WindField>();
        windField.gameObject.SetActive(false);

        inSprite = windField.transform.Find("WindFieldInSprite").gameObject;
        inSprite.SetActive(false);

        outSprite = windField.transform.Find("WindFieldOutSprite").gameObject;
        outSprite.SetActive(false);
    }
示例#2
0
    private void Awake()
    {
        GameObject terrain = new GameObject("_Terrain");
        GameObject grass   = new GameObject("_Grass");

        terrain.transform.parent = grass.transform.parent = transform;
        var mfT = terrain.AddComponent <MeshFilter>();
        var mfG = grass.AddComponent <MeshFilter>();

        mfT.mesh = FieldMesh.CreateField(_heightMap, _maxHeight, _terrainSize);
        mfG.mesh = FieldMesh.CreateGrass(_heightMap, _maxHeight, _terrainSize, _frequency);
        var mrT = terrain.AddComponent <MeshRenderer>();
        var mrG = grass.AddComponent <MeshRenderer>();

        mrT.material = _terrainMat;
        mrG.material = _grassMat;
        windField    = GetComponent <WindField>();
    }
示例#3
0
 void Start()
 {
     _windField = WindField.instance;
 }
示例#4
0
 void Awake()
 {
     _instance = this;
 }